let logger = require("pomelo-logger").getLogger(__filename);

module.exports = function (app) {
    return new Handler(app);
};

let Handler = function (app) {
    this.app = app;
};

Handler.prototype.login = function (msg, session, callback) {
    logger.info("msg=" + JSON.stringify(msg) + "frontendId=" + session.frontendId + " sessionId=" + session.id);
    this.app.get("playerService").login(msg, session, callback);
};